#include "library/libobject.h"
#include <apr_pools.h>
#include <apr_strings.h>
#include <exception>

using namespace basic::library2;
using namespace std;

apr_uint64_t CObject::GetHashCode() const
{
	return (apr_uint64_t)this;
}

void CObject::InitMemoryPool()
{
	if (apr_initialize() != APR_SUCCESS)
	{
		throw CObjectException("can'nt InitMemoryPool");
	}
	//printf("heihei\n");
}

CObjectException::CObjectException(const char *psErrMsg)
{
	apr_snprintf(m_sErrMsg, sizeof(m_sErrMsg), "%s", psErrMsg);
}
